<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${naviString}</title>
<link href="${ctx}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/commons/scripts/jquery-ui/themes/redmond/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/colorbox/skin4/colorbox.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
  <div align="left" style="width:99%">
    <div align="left" class="nav">${naviString}</div>
    <html-el:form action="/manager/RecommendProductInfo.do">
      <html-el:hidden property="method" value="save" />
      <html-el:hidden property="mod_id" />
      <br />
      <table width="100%" border="0" align="left" cellpadding="1" cellspacing="1" class="datagrid">
        <tr>
          <th colspan="2">推荐产品</th>
        </tr>
        <tr>
          <td colspan="2">
            <div class=demo>
              <c:forEach var="cur" items="${productInfolist}">
                <div id="accordion" class="accordion">
                  <h3><a href="#">${cur.map.type1_name}</a></h3>
                  <div style="padding-top: 0px;">
                    <ul>
                      <c:forEach var="cur_2" items="${cur.productType2List}">
                      	<li style="float: left;margin-left: 30px"><a href="#" style="text-decoration: none" title="点击选择产品" class="choose_pro" id="${cur_2.map.type2_id}" lang="${cur_2.map.type2_name}">${cur_2.map.type2_name}</a></li>
                      	<div>
                      	  
                      	</div>
                      </c:forEach>
                    </ul>
                  </div>
                </div>
              </c:forEach>  
            </div>
          </td>
        </tr>
      </table>
    </html-el:form>
  </div>
</div>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery-ui/ui/jquery-ui.js"></script>
<script type="text/javascript" src="${ctx}/commons/scripts/colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	
});

$(function() {
	$(".accordion").accordion({
		autoHeight: false,
		navigation: true,
		collapsible: true
	});

});

/*选择产品*/
$(".choose_pro").click(function (){
	var type2_id = $(this).attr("id");
	var type2_name = $(this).attr("lang");
	$(this).colorbox({iframe:true, width:840, height:650,href:'RecommendProduct.do?method=productSelect&type2_id='+type2_id+'&type2_name='+type2_name+'&mod_id=3200'});
	 
}).css("cursor", "pointer");// END_CLICK

function initStyle(){
	$("input[type='text']").css({border: "1px solid #ccc"});
	$("input[type='submit'],input[type='reset'],input[type='button']").css({border: "1px solid"});
	$("input[type='text'][readonly],input[type='password'][readonly],textarea[readonly]").css({color:"#000"});
    $("input[type='text'],input[type='password'],textarea").not("[readonly]").focus(function(){
    	$(this).addClass("row_focus");
    }).blur(function(){
    	$(this).removeClass("row_focus");
    });
    
	$("textarea").each(function(){
		this.onpropertychange = function () {
			if (this.scrollHeight > 16) this.style.posHeight = this.scrollHeight;
		};
	});
}

function setOnlyNum() {
	$(this).css("ime-mode", "disabled").attr("t_value", "").attr("o_value", "").bind("dragenter",function(){
		return false;
	});
	$(this).keypress(function (){
		if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value;
	}).keyup(function (){
		if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value;
	}).blur(function (){
		if(!this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?|\.\d*?)?$/))this.value=this.o_value;else{if(this.value.match(/^\.\d+$/))this.value=0+this.value;if(this.value.match(/^\.$/))this.value=0;this.o_value=this.value;}
		//if(this.value.length == 0) this.value = "0";
	});
	//this.text.selected;
}


//]]></script>
</body>
</html>
